package com.poly.system.controller;

import com.poly.common.core.domain.R;
import com.poly.common.security.annotation.RequiresPermissions;
import com.poly.system.pojo.dto.Server;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务器监控
 *
 * @author Poly
 */
@RestController
@RequestMapping("/monitor/server")
public class MonitorServerController
{
    @RequiresPermissions("monitor:server:list")
    @GetMapping()
    public R getInfo() throws Exception
    {
        Server server = new Server();
        server.copyTo();
        return R.ok(server);
    }
}
